<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
</html>
<script !src="">
    // 原型继承链
    function Animal() {
        this.colors = ['black', 'white']
    }
    function Dog() {
    }
    Dog.prototype = new Animal()

    let dog1 = new Dog()
    dog1.colors.push('brown')
    let dog2 = new Dog()
    console.log(dog2.colors)  // ['black', 'white', 'brown']

</script>
